% Remember to use the lgrind style

\Head{}
\File{./java/NodeEditor.java}{2006}{4}{27}{19:09}{11047}
\L{\LB{\C{}/*}}
\L{\LB{_*_NodeEditor.java}}
\L{\LB{_*}}
\L{\LB{_*_Created_on_December_11,_2005,_8:22_PM}}
\L{\LB{_*/\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}//_http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html\CE{}}}
\L{\LB{\C{}//_http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/WindowAdapter.html\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\K{package}_\V{project01};}}
\L{\LB{}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.*;}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{util}.*;}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}/**}}
\L{\LB{_*_Dialog_for_changing_node_(and_edge)_properties.}}
\L{\LB{_*}}
\L{\LB{_*_\CE{}\V{author}_\V{Ian}_\V{Melnick}}}
\L{\LB{\C{}*/\CE{}}}
\L{\LB{\K{public}_\K{class}_\V{NodeEditor}_\{}}
\L{\LB{}\Tab{4}{\V{JFrame}_\V{window};}}
\L{\LB{}\Tab{4}{\V{JTabbedPane}_\V{tabs};}}
\L{\LB{}\Tab{4}{\V{JPanel}_\V{bottom},_\V{npf},_\V{ecf},_\V{ecp},_\V{fpf},_\V{fcp};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\V{JTextField}_\V{description},_\V{distance};}}
\L{\LB{}\Tab{4}{\V{JCheckBox}_\V{visible},_\V{delete},_\V{deledge},_\V{linksFloors};}}
\L{\LB{}\Tab{4}{\V{JComboBox}_\V{connections},_\V{floorLinks};}}
\L{\LB{}\Tab{4}{\K{int}_\V{dnodeId};}}
\L{\LB{}\Tab{4}{\V{JButton}_\V{save},_\V{addFloorLink},_\V{delFloorLink};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\V{NodeItem}_\V{node};}}
\L{\LB{}\Tab{4}{\V{MapComponent}_\V{imc};}}
\L{\LB{}\Tab{4}{\V{LinkedList}\<\V{NodeItem}\>_\V{cl};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\V{WindowMethods}_\V{wm};}}
\L{\LB{}\Tab{4}{\V{ButtonMethods}_\V{bm};}}
\L{\LB{}\Tab{4}{\V{ItemMethods}}\Tab{18}{\V{im};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**}}
\L{\LB{}\Tab{5}{*_Creates_a_new_instance_of_NodeEditor_}}
\L{\LB{}\Tab{5}{*/\CE{}}}
\index{NodeEditor}\Proc{NodeEditor}\L{\LB{}\Tab{4}{\K{public}_\V{NodeEditor}(\V{NodeItem}_\V{node},_\V{MapComponent}_\V{imc})_\{}}
\L{\LB{}\Tab{8}{\K{this}.\V{node}_=_\V{node};}}
\L{\LB{}\Tab{8}{\K{this}.\V{imc}_=_\V{imc};}}
\L{\LB{}\Tab{8}{\K{this}.\V{dnodeId}_=_\N{0};}\Tab{33}{}}
\L{\LB{}\Tab{8}{\K{this}.\V{cl}_=_\V{imc}.\V{nm}.\V{connectedNodes}(\V{node});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{wm}_=_\K{new}_\V{WindowMethods}();}}
\L{\LB{}\Tab{8}{\V{bm}_=_\K{new}_\V{ButtonMethods}();}}
\L{\LB{}\Tab{8}{\V{im}_=_\K{new}_\V{ItemMethods}();}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{window}_=_\K{new}_\V{JFrame}(\S{}\3Modify_Node_\3\SE{}_+_\K{this}.\V{node}.\V{id}());}}
\L{\LB{}\Tab{8}{\V{window}.\V{setLayout}(\K{new}_\V{BorderLayout}());}}
\L{\LB{}\Tab{8}{\V{window}.\V{setDefaultCloseOperation}(\V{JFrame}.\V{DISPOSE\_ON\_CLOSE});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{tabs}_=_\K{new}_\V{JTabbedPane}();}}
\L{\LB{}\Tab{8}{\V{bottom}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{\V{npf}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{\V{ecf}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{\V{ecp}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{\V{fpf}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{\V{fcp}_=_\K{new}_\V{JPanel}();}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{bottom}.\V{setLayout}(\K{new}_\V{FlowLayout}());}}
\L{\LB{}\Tab{12}{\V{save}_=_\K{new}_\V{JButton}(\S{}\3Update\3\SE{});}}
\L{\LB{}\Tab{12}{\V{bottom}.\V{add}(\V{save});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{npf}.\V{setLayout}(\K{new}_\V{GridLayout}(\N{6},\N{2}));}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\K{new}_\V{JLabel}(\S{}\3ID\3\SE{}));}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\K{new}_\V{JLabel}(\V{String}.\V{valueOf}(\V{node}.\V{id}())));}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\K{new}_\V{JLabel}(\S{}\3Location\3\SE{}));}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\K{new}_\V{JLabel}(\V{node}.\V{location}().\V{toString}()));}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\V{description}_=_\K{new}_\V{JTextField}(\V{node}.\V{description}());}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\K{new}_\V{JLabel}(\S{}\3Description\3\SE{}));}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\V{description});}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\V{visible}_=_\K{new}_\V{JCheckBox}(\S{}\3Visible\3\SE{},\V{node}.\V{visibility}());}}
\L{\LB{}\Tab{12}{\V{delete}_=_\K{new}_\V{JCheckBox}(\S{}\3Delete\3\SE{},_\K{false});}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\V{visible});}}
\L{\LB{}\Tab{12}{\V{npf}.\V{add}(\V{delete});}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{8}{\V{ecp}.\V{setLayout}(\K{new}_\V{GridLayout}(\N{2},\N{3}));}\Tab{48}{\C{}//_Edge_properties_panel,_shown_only_when_edge_selected_via_ecf\CE{}}}
\L{\LB{}\Tab{12}{\V{ecp}.\V{setVisible}(\K{false});}}
\L{\LB{}\Tab{12}{\C{}//ecp.add(new_JLabel(\3Orientation_N/A\3));\CE{}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\V{distance}_=_\K{new}_\V{JTextField}();}\Tab{50}{\C{}//_set_in_ButtonMethods\CE{}}}
\L{\LB{}\Tab{12}{\V{ecp}.\V{add}(\K{new}_\V{JLabel}(\S{}\3Distance_(Paces)\3\SE{}));}}
\L{\LB{}\Tab{12}{\V{ecp}.\V{add}(\V{distance});}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\V{deledge}_=_\K{new}_\V{JCheckBox}(\S{}\3Delete\3\SE{},_\K{false});}}
\L{\LB{}\Tab{12}{\V{ecp}.\V{add}(\V{deledge});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{ecf}.\V{setLayout}(\K{new}_\V{BorderLayout}());}}
\L{\LB{}\Tab{12}{\K{if}(\V{cl}.\V{size}()_\>_\N{0})_\{}}
\L{\LB{}\Tab{16}{\V{Vector}\<\V{String}\>_\V{nids}_=_\K{new}_\V{Vector}\<\V{String}\>();}}
\L{\LB{}\Tab{16}{\V{nids}.\V{add}(\S{}\3Select_connected_node_to_modify_edge\3\SE{});}}
\L{\LB{}\Tab{16}{\V{ListIterator}\<\V{NodeItem}\>_\V{li}_=_\V{cl}.\V{listIterator}();}}
\L{\LB{}\Tab{16}{\V{NodeItem}_\V{t};}}
\L{\LB{}\Tab{16}{\K{while}(\V{li}.\V{hasNext}())_\{}}
\L{\LB{}\Tab{20}{\V{t}_=_\V{li}.\V{next}();}}
\L{\LB{}\Tab{20}{\V{nids}.\V{add}(\V{String}.\V{valueOf}(\V{t}.\V{id}()));}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{connections}_=_\K{new}_\V{JComboBox}(\V{nids});}}
\L{\LB{}\Tab{16}{\V{ecf}.\V{add}(\V{connections},_\V{BorderLayout}.\V{NORTH});}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{12}{\V{ecf}.\V{add}(\V{ecp}\C{}/*,_BorderLayout.SOUTH*/\CE{});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//_container_for_floorLink_properties\CE{}}}
\L{\LB{}\Tab{8}{\V{fpf}.\V{setLayout}(\K{new}_\V{BorderLayout}());}}
\L{\LB{}\Tab{8}{\V{fcp}.\V{setLayout}(\K{new}_\V{FlowLayout}());}}
\L{\LB{}\Tab{12}{\V{addFloorLink}_=_\K{new}_\V{JButton}(\S{}\3Add_New_Link\3\SE{});}}
\L{\LB{}\Tab{12}{\V{delFloorLink}_=_\K{new}_\V{JButton}(\S{}\3Remove_Selection\3\SE{});}}
\L{\LB{}\Tab{12}{\V{initFloorLinkPane}();}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{tabs}.\V{addTab}(\S{}\3Node\3\SE{},_\K{null},_\V{npf},_\S{}\3Change_Node_Properties\3\SE{});}}
\L{\LB{}\Tab{8}{\V{tabs}.\V{addTab}(\S{}\3Edges\3\SE{},_\K{null},_\V{ecf},_\S{}\3Change_Edge_Properties\3\SE{});}}
\L{\LB{}\Tab{8}{\V{tabs}.\V{addTab}(\S{}\3Floors\3\SE{},_\K{null},_\V{fpf},_\S{}\3Change_Floor\-Link_Properties\3\SE{});}}
\L{\LB{}\Tab{8}{\V{window}.\V{add}(\V{tabs});}}
\L{\LB{}\Tab{8}{\V{window}.\V{add}(\V{bottom},_\V{BorderLayout}.\V{SOUTH});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{window}.\V{addWindowListener}(\V{wm});}}
\L{\LB{}\Tab{8}{\V{save}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{\V{addFloorLink}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{\V{delFloorLink}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{\K{if}(\V{node}.\V{isFloorLink}())}\Tab{32}{\V{floorLinks}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{\K{if}(\V{cl}.\V{size}()_\>_\N{0})}\Tab{32}{\V{connections}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{window}.\V{pack}();}}
\L{\LB{}\Tab{8}{\V{window}.\V{setVisible}(\K{true});}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\index{initFloorLinkPane}\Proc{initFloorLinkPane}\L{\LB{}\Tab{4}{\K{private}_\K{void}_\V{initFloorLinkPane}()_\{}}
\L{\LB{}\Tab{8}{\V{fpf}.\V{removeAll}();}}
\L{\LB{}\Tab{8}{\C{}//fpf.add(new_JLabel(\3Get_down_on_the_floors,_whores!\3));\CE{}}}
\L{\LB{}\Tab{8}{\C{}/*}}
\L{\LB{}\Tab{9}{*_Checkbox:_This_node_connects_to_other_floors}}
\L{\LB{}\Tab{9}{*_If_checkbox_is_yes,_display:}}
\L{\LB{}\Tab{9}{*}\Tab{13}{List_of_connected_floors}}
\L{\LB{}\Tab{9}{*}\Tab{13}{Remove_button}}
\L{\LB{}\Tab{9}{*}\Tab{13}{Add_button}}
\L{\LB{}\Tab{9}{*/\CE{}}}
\L{\LB{}\Tab{8}{\V{linksFloors}_=_\K{new}_\V{JCheckBox}(\S{}\3Links_floors\3\SE{},\V{node}.\V{isFloorLink}());}}
\L{\LB{}\Tab{8}{\V{linksFloors}.\V{addItemListener}(\V{im});}}
\L{\LB{}\Tab{8}{\V{fpf}.\V{add}(\V{linksFloors},_\V{BorderLayout}.\V{NORTH});}}
\L{\LB{}\Tab{8}{\V{fpf}.\V{add}(\V{fcp});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//_floorLink_editor_pane_(shown_only_when_selected_via_fpf)\CE{}}}
\L{\LB{}\Tab{8}{\V{fcp}.\V{removeAll}();}}
\L{\LB{}\Tab{8}{\V{floorLinks}_=_\K{new}_\V{JComboBox}(\V{node}.\V{connectedFloors}().\V{toArray}());}}
\L{\LB{}\Tab{8}{\V{fcp}.\V{add}(\V{addFloorLink});}}
\L{\LB{}\Tab{8}{\K{if}(\V{node}.\V{isFloorLink}())_\{}}
\L{\LB{}\Tab{12}{\V{fcp}.\V{add}(\V{floorLinks});}}
\L{\LB{}\Tab{12}{\V{fcp}.\V{add}(\V{delFloorLink});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{\V{fcp}.\V{setVisible}(\V{node}.\V{isFloorLink}());}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{private}_\K{class}_\V{WindowMethods}_\K{extends}_\V{WindowAdapter}_\{}}
\index{windowClosed}\Proc{windowClosed}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{windowClosed}(\V{WindowEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\V{node}.\V{select}();}}
\L{\LB{}\Tab{12}{\V{imc}.\V{repaint}();}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{private}_\K{class}_\V{ItemMethods}_\K{implements}_\V{ItemListener}_\{}}
\index{itemStateChanged}\Proc{itemStateChanged}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{itemStateChanged}(\V{ItemEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{linksFloors})_\{}}
\L{\LB{}\Tab{16}{\K{switch}(\V{e}.\V{getStateChange}())_\{}}
\L{\LB{}\Tab{20}{\K{case}_\V{ItemEvent}.\V{SELECTED:}}}
\L{\LB{}\Tab{24}{\V{fcp}.\V{setVisible}(\K{true});}}
\L{\LB{}\Tab{24}{\K{break};}}
\L{\LB{}\Tab{20}{\K{case}_\V{ItemEvent}.\V{DESELECTED:}}}
\L{\LB{}\Tab{24}{\V{fcp}.\V{setVisible}(\K{false});}}
\L{\LB{}\Tab{24}{\C{}//TODO:_turn_this_into_a_method\CE{}}}
\L{\LB{}\Tab{24}{\V{Set}\<\V{String}\>_\V{floors}_=_\V{node}.\V{connectedFloors}();}}
\L{\LB{}\Tab{24}{\V{Iterator}\<\V{String}\>_\V{j}_=_\V{floors}.\V{iterator}();}}
\L{\LB{}\Tab{24}{\V{String}_\V{floor};}}
\L{\LB{}\Tab{24}{\V{NodeItem}_\V{connection};}}
\L{\LB{}\Tab{24}{\K{while}(\V{j}.\V{hasNext}())_\{}}
\L{\LB{}\Tab{28}{\V{floor}_=_\V{j}.\V{next}();}}
\L{\LB{}\Tab{28}{\V{connection}_=_\V{node}.\V{floorLink}(\V{floor});}}
\L{\LB{}\Tab{28}{\C{}//connection.delFloorLink(floor);\CE{}}}
\L{\LB{}\Tab{28}{\V{FloorLinker}.\V{deleteConnection}(\V{imc}.\V{map}(),_\V{floor},_\V{connection}.\V{id}());}}
\L{\LB{}\Tab{28}{\V{node}.\V{delFloorLink}(\V{floor});}}
\L{\LB{}\Tab{24}{\}}}
\L{\LB{}\Tab{24}{\V{imc}.\V{nm}.\V{saveNodes}();}}
\L{\LB{}\Tab{24}{\V{initFloorLinkPane}();}}
\L{\LB{}\Tab{24}{\K{break};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/*_Listener_methods_for_button_and_combobox_actions_*/\CE{}}}
\L{\LB{}\Tab{4}{\K{private}_\K{class}_\V{ButtonMethods}_\K{implements}_\V{ActionListener}_\{}}
\index{actionPerformed}\Proc{actionPerformed}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{actionPerformed}(\V{ActionEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{save})_\{}}
\L{\LB{}\Tab{16}{\C{}//_set_node_properties_as_modified_in_dialog\CE{}}}
\L{\LB{}\Tab{16}{\K{if}(\V{delete}.\V{isSelected}())}}
\L{\LB{}\Tab{20}{\V{imc}.\V{nm}.\V{delNode}(\V{node});}}
\L{\LB{}\Tab{16}{\K{else}_\{}}
\L{\LB{}\Tab{20}{\K{if}(\V{visible}.\V{isSelected}()!=\V{node}.\V{visibility}())}}
\L{\LB{}\Tab{24}{\V{node}.\V{visible}();}}
\L{\LB{}\Tab{20}{\V{node}.\V{setDescription}(\V{description}.\V{getText}());}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\C{}//_set_edge_properties\CE{}}}
\L{\LB{}\Tab{16}{\V{saveEdgeProperties}();}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\C{}//_close_window\CE{}}}
\L{\LB{}\Tab{16}{\V{window}.\V{dispose}();}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{connections})_\{}}
\L{\LB{}\Tab{16}{\K{try}_\{}}
\L{\LB{}\Tab{20}{\K{if}(\V{dnodeId}!=\N{0})}}
\L{\LB{}\Tab{24}{\V{saveEdgeProperties}();}}
\L{\LB{}\Tab{20}{\V{dnodeId}_=_\V{Integer}.\V{parseInt}((\V{String})\V{connections}.\V{getSelectedItem}());}}
\L{\LB{}\Tab{20}{\V{distance}.\V{setText}(((\V{imc}.\V{nm}.\V{sharedEdge}(\V{node},_\V{imc}.\V{nm}.\V{getNodeById}(\V{dnodeId}))).\V{getDistance}())+\S{}\3\3\SE{});}}
\L{\LB{}\Tab{20}{\V{ecp}.\V{setVisible}(\K{true});}}
\L{\LB{}\Tab{16}{\}_\K{catch}_(\V{NumberFormatException}_\V{ex})_\{}}
\L{\LB{}\Tab{20}{\V{dnodeId}_=_\N{0};}}
\L{\LB{}\Tab{20}{\C{}//System.err.println(ex);\CE{}}}
\L{\LB{}\Tab{20}{\C{}//_Remove_properties_window\CE{}}}
\L{\LB{}\Tab{20}{\V{ecp}.\V{setVisible}(\K{false});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\C{}//_Floor-link_actions\CE{}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{addFloorLink})_\{}}
\L{\LB{}\Tab{16}{\V{String}[\,]_\V{images}_=_\V{Utility}.\V{map\_images}(\V{imc}.\V{map}().\V{split}(\S{}\3\_\3\SE{})[\N{0}]);}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\C{}//_Create_new_FloorLinkers_for_floors_above_and_below_this_one.\CE{}}}
\L{\LB{}\Tab{16}{\K{int}_\V{thisFloor}_=_\V{Character}.\V{valueOf}((\V{imc}.\V{map}().\V{split}(\S{}\3\_\3\SE{})[\N{1}]).\V{charAt}(\N{0}));}}
\L{\LB{}\Tab{16}{\K{int}_\V{otherFloor};}}
\L{\LB{}\Tab{16}{\V{String}_\V{otherMap};}}
\L{\LB{}\Tab{16}{\V{FloorLinker}_\V{linker};}}
\L{\LB{}\Tab{16}{\K{for}(\K{int}_\V{i}=\N{0};_\V{i}\<\V{images}.\V{length};_\V{i}++)_\{}}
\L{\LB{}\Tab{20}{\V{otherFloor}_=_\V{Character}.\V{valueOf}((\V{images}[\V{i}].\V{split}(\S{}\3\_\3\SE{})[\N{2}]).\V{charAt}(\N{0}));}}
\L{\LB{}\Tab{20}{\V{otherMap}_=_\V{images}[\V{i}].\V{split}(\S{}\3map\_\3\SE{})[\N{1}];}}
\L{\LB{}\Tab{20}{\V{otherMap}_=_\V{otherMap}.\V{substring}(\N{0},_\V{otherMap}.\V{length}()\-\N{4});}}
\L{\LB{}\Tab{20}{\K{if}((\V{otherFloor}==\V{thisFloor}+\N{1}_\|\,\|_\V{otherFloor}==\V{thisFloor}\-\N{1})_\&\&_!\V{node}.\V{hasFloorLink}(\V{otherMap}))_\{}}
\L{\LB{}\Tab{24}{\C{}//_One_FloorLinker_at_a_time---otherwise_Heap_barfs\CE{}}}
\L{\LB{}\Tab{24}{\C{}//_Linker_takes_care_of_updating_node_data_once_user_selects_dest_node\CE{}}}
\L{\LB{}\Tab{24}{\V{linker}_=_\K{new}_\V{FloorLinker}(\V{imc}.\V{map}(),_\V{otherMap},_\V{node},_\V{imc}.\V{getCoordinates}());}}
\L{\LB{}\Tab{24}{\K{break};}}
\L{\LB{}\Tab{20}{\}}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\C{}//imc.nm.saveNodes();\CE{}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{delFloorLink})_\{}}
\L{\LB{}\Tab{16}{\C{}//System.out.println(\3delFloorLink\3);\CE{}}}
\L{\LB{}\Tab{16}{\C{}//_Delete_link_from_node_on_each_floor\CE{}}}
\L{\LB{}\Tab{16}{\C{}//_NodeItem.delFloorLink(_(String)linksFloors.getSelectedItem()_);\CE{}}}
\L{\LB{}\Tab{16}{\V{String}_\V{floor}_=_(\V{String})\V{floorLinks}.\V{getSelectedItem}();}}
\L{\LB{}\Tab{16}{\V{Set}\<\V{String}\>_\V{updFloors}_=_\V{node}.\V{connectedFloors}();}}
\L{\LB{}\Tab{16}{\V{Iterator}\<\V{String}\>_\V{i}_=_\V{updFloors}.\V{iterator}();}}
\L{\LB{}\Tab{16}{\V{NodeItem}_\V{next};}}
\L{\LB{}\Tab{16}{\K{while}(\V{i}.\V{hasNext}())_\{}}
\L{\LB{}\Tab{20}{\V{next}_=_\V{node}.\V{floorLink}(\V{i}.\V{next}());}}
\L{\LB{}\Tab{20}{\V{FloorLinker}.\V{deleteConnection}(\V{imc}.\V{map}(),_\V{floor},_\V{next}.\V{id}());}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{node}.\V{delFloorLink}(\V{floor});}}
\L{\LB{}\Tab{16}{\V{imc}.\V{nm}.\V{saveNodes}();}}
\L{\LB{}\Tab{16}{\V{initFloorLinkPane}();}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//\CE{}}}
\L{\LB{}\Tab{8}{}}
\index{saveEdgeProperties}\Proc{saveEdgeProperties}\L{\LB{}\Tab{8}{\K{private}_\K{void}_\V{saveEdgeProperties}()_\{}}
\L{\LB{}\Tab{12}{\V{NodeItem}_\V{dnode}}\Tab{28}{=_\V{imc}.\V{nm}.\V{getNodeById}(\V{dnodeId});}}
\L{\LB{}\Tab{12}{\V{EdgeItem}_\V{edge}}\Tab{28}{=_\V{imc}.\V{nm}.\V{sharedEdge}(\V{node},_\V{dnode});}}
\L{\LB{}\Tab{12}{\K{if}(\V{dnodeId}_\>_\N{0}_\&\&_\V{deledge}.\V{isSelected}())_\{}\Tab{57}{}}
\L{\LB{}\Tab{16}{\V{node}.\V{delEdge}(\V{edge});}}
\L{\LB{}\Tab{16}{\V{dnode}.\V{delEdge}(\V{edge});}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{\K{else}_\K{if}(\V{edge}!=\K{null})_\{}}
\L{\LB{}\Tab{16}{\K{try}_\{}}
\L{\LB{}\Tab{20}{\V{edge}.\V{setDistance}(\V{Integer}.\V{parseInt}(\V{distance}.\V{getText}()));}}
\L{\LB{}\Tab{16}{\}_\K{catch}(\V{NumberFormatException}_\V{err})_\{}}
\L{\LB{}\Tab{20}{\V{JOptionPane}.\V{showMessageDialog}(\K{null},_\S{}\3Invalid_Distance\3\SE{},_\S{}\3Error\3\SE{},_\V{JOptionPane}.\V{ERROR\_MESSAGE});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{\}}}
